<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ include file="/WEB-INF/pages/leftNavigation.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Real_Estate_4_Rent</title>
<script type="text/javascript" src="<c:url value="/resources/js/jquery.min.js"/>">
</script>

<link href="<c:url value="/resources/style/leftmenu.css"/>" rel="stylesheet" type="text/css" />
<link href="<c:url value="/resources/style/style_test.css"/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value="/resources/js/jquery-1.11.0.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/js/jquery.cycle.all.js"/>"></script>
<script type="text/javascript">
	$('#slider').cycle({ 
    fx:     'scrollHorz', 
    speed:   'fast'
});
</script>
<style>
#table_compare{
	float: none;
	margin-left: auto;
	margin-right: auto;
	width: 950px;
}

#table_compare table
{
	border-collapse:collapse;
    box-shadow: 0 0 10px #BBBBBB;
    margin-bottom: 5px;
}
#table_compare td, #table_compare th{
	border: 1px solid #aaa;
}
#name_amenity_compare{
	padding-left: 10px;
}

#value_amenity{
	text-align: center;
	height: 40px;
}
#image_product_compare {
	display: block;
	float: none;
	width: 240px;
	margin-left: 10px;
 }

#title_compare{
	height: 30px;
	background-color: #01AEF2;
	margin-top: 5px;
	color: #FFFFFF;
	padding-left: 10px;
	padding-top: 3px;
}	

</style>

</head>

<body>
<!--the left menu amazon-->
<!-- end the left menu-->
<!-- top navigation -->
<%@ include file="/WEB-INF/pages/topnavigation.jsp" %>
<!-- / top navigation -->
<div id="main_container">
  <div id="background_main">
    <div id="main">
   		<!-- search form -->
      <%@ include file="/WEB-INF/pages/searchform.jsp" %>
      <!-- /search form -->
      <div id="hot_property">
			<div id="wrapper">
			  <div id="container">
				<div id="slider">
					<img src="<c:url value="/resources/images/bestreal-11.jpg"/>" width="665" height="390" />
					<img src="<c:url value="/resources/images/bestreal-13.jpg"/>" width="665" height="390" />
	          	</div>
			  </div>
			</div>
		</div>
  </div>
	
	<div id="table_compare">
	<div id="title_compare">Compare</div>
	<table width="950">
  <tr height="200px">
    <td width="150">&nbsp;</td>
    <td>
    	<c:if test="${not empty product0 }">
			<c:if test="${not empty product0.picture }">
				<c:forTokens items="${product0.picture }" delims=";" var="name" varStatus="counter">
					<c:choose>
						<c:when test="${counter.count == 1 && not empty name}">
							<div id="image_product_compare">
								<a href="productDetail/${product0.id }"><img src="${pageContext.request.contextPath}/images${name }" width="240" height="150"/></a>
								<div id="value_amenity">${product0.productName }</div>
							</div>
						</c:when>
					</c:choose>
				</c:forTokens>
			</c:if>
			<c:if test="${empty product0.picture }">
				<div id="image_product" width="240px" height="150px" >
					<img src="#" alt="${product0.productName }" width="240px;" height="150px;">
				</div>
			</c:if>
		</c:if>
	</td>
    <td>
		<c:if test="${not empty product1 }">
			<c:if test="${not empty product1.picture }">
				<c:forTokens items="${product1.picture }" delims=";" var="name" varStatus="counter">
					<c:choose>
						<c:when test="${counter.count == 1 && not empty name}">
							<div id="image_product_compare">
								<a href="productDetail/${product0.id }"><img src="${pageContext.request.contextPath}/images${name }" width="240" height="150"/></a>
								<div id="value_amenity">${product1.productName }</div>
							</div>
						</c:when>
					</c:choose>
				</c:forTokens>
			</c:if>
			<c:if test="${empty product1.picture }">
				<div id="image_product" width="240px" height="150px" >
					<img src="#" alt="${product1.productName }" width="240px;" height="150px;">
				</div>
			</c:if>
		</c:if>
	</td>
    <td>
		<c:if test="${not empty product2 }">
			<c:if test="${not empty product2.picture }">
				<c:forTokens items="${product2.picture }" delims=";" var="name" varStatus="counter">
					<c:choose>
						<c:when test="${counter.count == 1 && not empty name}">
							<div id="image_product_compare">
								<a href="productDetail/${product0.id }"><img src="${pageContext.request.contextPath}/images${name }" width="240" height="150"/></a>
								<div id="value_amenity">${product2.productName }</div>
							</div>
						</c:when>
					</c:choose>
				</c:forTokens>
			</c:if>
			<c:if test="${empty product2.picture }">
				<div id="image_product" width="240px" height="150px" >
					<img src="#" alt="${product2.productName }" width="240px;" height="150px;">
				</div>
			</c:if>
		</c:if>
	</td>
  </tr>
  <tr>
    <td id="name_amenity_compare">Price</td>
    <c:if test="${not empty product0 }">
    	<c:choose>
    		<c:when test="${product0.price == minPrice }">
    			<td id="value_amenity" style="color:red;">${product0.price } USD/month</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product0.price} USD/month</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product1 }">
    	<c:choose>
    		<c:when test="${product1.price == minPrice }">
    			<td id="value_amenity" style="color:red;">${product1.price } USD/month</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product1.price} USD/month</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product2 }">
    	<c:choose>
    		<c:when test="${product2.price == minPrice }">
    			<td id="value_amenity" style="color:red;">${product2.price } USD/month</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product2.price} USD/month</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Sqft</td>
    <c:if test="${not empty product0 }">
    	<c:choose>
    		<c:when test="${product0.sqft == minSqft }">
    			<td id="value_amenity" style="color:red;">${product0.sqft } sqm</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product0.sqft} sqm</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product1 }">
    	<c:choose>
    		<c:when test="${product1.sqft == minSqft }">
    			<td id="value_amenity" style="color:red;">${product1.sqft } sqm</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product1.sqft} sqm</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product2 }">
    	<c:choose>
    		<c:when test="${product2.sqft == minSqft }">
    			<td id="value_amenity" style="color:red;">${product2.sqft } sqm</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product2.sqft} sqm</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Room</td>
    <c:if test="${not empty product0 }">
    	<c:choose>
    		<c:when test="${product0.room == minRoom }">
    			<td id="value_amenity" style="color:red;">${product0.room }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product0.room}</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product1 }">
    	<c:choose>
    		<c:when test="${product1.room == minRoom }">
    			<td id="value_amenity" style="color:red;">${product1.room }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product1.room}</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product2 }">
    	<c:choose>
    		<c:when test="${product2.room == minRoom }">
    			<td id="value_amenity" style="color:red;">${product2.room }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product2.room}m</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Bedroom</td>
    <c:if test="${not empty product0 }">
    	<c:choose>
    		<c:when test="${product0.bedroom == minBedRoom }">
    			<td id="value_amenity" style="color:red;">${product0.bedroom }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product0.bedroom}</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product1 }">
    	<c:choose>
    		<c:when test="${product1.bedroom == minBedRoom }">
    			<td id="value_amenity" style="color:red;">${product1.bedroom }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product1.bedroom}</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${not empty product2 }">
    	<c:choose>
    		<c:when test="${product2.bedroom == minBedRoom }">
    			<td id="value_amenity" style="color:red;">${product2.bedroom }</td>
    		</c:when>
    		<c:otherwise>
    			<td id="value_amenity">${product2.bedroom}m</td>
    		</c:otherwise>
    	</c:choose>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr height="50px">
    <td id="name_amenity_compare">Address</td>
    <c:if test="${not empty product0}">
    	<td id="value_amenity">${product0.address } </td>
    </c:if>
   <c:if test="${not empty product1}">
    	<td id="value_amenity">${product1.address } </td>
    </c:if>
    <c:if test="${not empty product2}">
    	<td id="value_amenity">${product2.address } </td>
    </c:if>
     <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Internet</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
    		<c:choose>
    			<c:when test="${not empty productCommonValue0.get('internet')}">
    				<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
    			</c:when>
    			<c:otherwise>
    				<td id="value_amenity"></td>
    			</c:otherwise>
    		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
    		<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('internet')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('internet')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
   <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
    </tr>
  <tr>
    <td id="name_amenity_compare">Balcony</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
    		<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('balcony')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('balcony')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
    		<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('balcony')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Near Hospital</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('near_hospital')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('near_hospital')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
    		<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('near_hospital')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Parking</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('parking')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('parking')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('parking')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Garden</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
    		<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('garden')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('garden')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('garden')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Basement</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('basement')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('basement')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('basement')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Near Shopping Center</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('shopping_center')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('shopping_center')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('shopping_center')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Security 24/24</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('security')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('security')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('security')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Front yard</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('front_yard')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('front_yard')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('front_yard')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
  <tr>
    <td id="name_amenity_compare">Terrace</td>
    <c:if test="${not empty product0}">
    	<c:if test="${not empty listProduct0 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue0.get('terrace')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product1}">
    	<c:if test="${not empty listProduct1 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue1.get('terrace')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${not empty product2}">
    	<c:if test="${not empty listProduct2 }">
			<c:choose>    		
	    		<c:when test="${not empty productCommonValue2.get('terrace')}">
	    			<td id="value_amenity"><img src="<c:url value="/resources/images/tick.png"/>" width="20" height="20"></td>
	    		</c:when>
	   			<c:otherwise>
	   				<td id="value_amenity"></td>
	   			</c:otherwise>
	   		</c:choose>
    	</c:if>
    </c:if>
    <c:if test="${empty product2}">
    	<td id="value_amenity" width="265"></td>
    </c:if>
  </tr>
</table>
</div>
	<!-- related product => newest products-->
	<!-- New Property area -->
  <c:if test="${not empty listNewProperty}">
  <div id="product_area" class="new_properties_area">
  	<div id="name_property">
		<a href="resultProperty?categoryCode=ALL&pageSize=6&page=1">New property</a>
	</div>
  			<c:set var="numberNewProperty" value="0"> </c:set>
  			<c:forEach var="apartment" items="${listNewProperty }">
  				<% 
  					String numberNewPropertyValue = (String)pageContext.getAttribute("numberNewProperty");
  					Integer number = Integer.parseInt(numberNewPropertyValue);
  					number++;
					pageContext.setAttribute("numberNewProperty", number + "");
			    %>
			    <c:choose>
			  	  <c:when test="${numberNewProperty %2 != 0 && numberApartment == fn:length(listNewProperty)}">
						<div id="line2">
							<div id="col1">
								<a href="productDetail/${apartment.id }">
									<div id="image_product" width="240px" height="150px" ><img src="${pageContext.request.contextPath}/images${apartment.picture }" width="240px" height="150px" />
									</div>
								</a>
								<div id="information_detail">
									<div id="characteristic_special" style="width: 100%;">${apartment.special} <div id="special_mark">*</div></div>
									<div id="characteristic" style="float:right;">Bedroom: ${apartment.bedroom}</div>
									<div id="characteristic">Room: ${apartment.room}</div>
									<div id="characteristic" style="width: 100%;">Sqft: ${apartment.sqft} sqm</div>
									<div id="characteristic" style="width: 100%;">Interior: ${apartment.brtbInterior.interiorName}</div>
									<div id="price">Price: 
										<div id="highlight">${apartment.price} USD/month</div>
									</div>
  									<div id="characteristic_favorite" onclick="addToFavorite(${apartment.id }, '${pageContext.request.contextPath}/images${apartment.picture }')">
										<img src="<c:url value="/resources/images/favorite.jpg"/>" style="width:20px; height:20px;"/> &nbsp;Add favorites
									</div>
								</div>
								<div id="address">Address: ${apartment.address}</div>
								<a href="productDetail/${apartment.id }">
						        <div id="address_detail">${apartment.productName}</div>
						        </a>
							</div>
					</c:when>
			    	<c:when test="${numberNewProperty %2 != 0}">
						<div id="line2">
							<div id="col1">
								<a href="productDetail/${apartment.id }">
									<div id="image_product" width="240px" height="150px" ><img src="${pageContext.request.contextPath}/images${apartment.picture }" width="240px" height="150px" />
									</div>
								</a>
								<div id="information_detail">
									<div id="characteristic_special" style="width: 100%;">${apartment.special} <div id="special_mark">*</div></div>
									<div id="characteristic" style="float:right;">Bedroom: ${apartment.bedroom}</div>
									<div id="characteristic">Room: ${apartment.room}</div>
									<div id="characteristic" style="width: 100%;">Sqft: ${apartment.sqft} sqm</div>
									<div id="characteristic" style="width: 100%;">Interior: ${apartment.brtbInterior.interiorName}</div>
									<div id="price">Price: 
										<div id="highlight">${apartment.price} USD/month</div>
									</div>
  									<div id="characteristic_favorite" onclick="addToFavorite(${apartment.id }, '${pageContext.request.contextPath}/images${apartment.picture }')">
										<img src="<c:url value="/resources/images/favorite.jpg"/>" style="width:20px; height:20px;"/> &nbsp;Add favorites
									</div>
								</div>
								<div id="address">Address: ${apartment.address}</div>
								<a href="productDetail/${apartment.id }">
						        <div id="address_detail">${apartment.productName}</div>
						        </a>
							</div>
					</c:when>
					<c:otherwise>
						<div id="col2">
								<a href="productDetail/${apartment.id}">
									<div id="image_product" width="240px" height="150px" ><img src="${pageContext.request.contextPath}/images${apartment.picture }" width="240px" height="150px" />
									</div>
								</a>
								<div id="information_detail">
									<div id="characteristic_special" style="width: 100%;">${apartment.special} <div id="special_mark">*</div></div>
									<div id="characteristic" style="float:right;">Bedroom: ${apartment.bedroom}</div>
									<div id="characteristic">Room: ${apartment.room}</div>
									<div id="characteristic" style="width: 100%;">Sqft: ${apartment.sqft} sqm</div>
									<div id="characteristic" style="width: 100%;">Interior: ${apartment.brtbInterior.interiorName}</div>
									<div id="price">Price: 
										<div id="highlight">${apartment.price} USD/month</div>
									</div>
  									<div id="characteristic_favorite" onclick="addToFavorite(${apartment.id }, '${pageContext.request.contextPath}/images${apartment.picture }')">
										<img src="<c:url value="/resources/images/favorite.jpg"/>" style="width:20px; height:20px;"/> &nbsp;Add favorites
									</div>
								</div>
								<div id="address">Address: ${apartment.address}</div>
								<a href="productDetail/${apartment.id}">
						        <div id="address_detail">${apartment.productName}</div>
						        </a>
						</div>
						</div>
					</c:otherwise>
				</c:choose>
	    	</c:forEach>
    <div id="more_product"><a href="#">More...</a></div>
  </div>
  </c:if>
	<!-- /end newest products -->
  </div>
  </div>
</div>
<!--end main_container-->
	<div id="product_area_footer" class="villa_area">
		<div id="name_property_footer">
			<div id="option_menu">
				<ul id="nav">
				  <li><a href="#">passport</a></li>
				  <li><a href="#">hotel</a></li>
				  <li><a href="#">rent car</a></li>
				  <li><a href="#">school</a></li>
				</ul>
			</div>
		</div>		
	</div>
	<div id="fullsupport">
		<strong>For more information contact with Mr Phuc: 0904 674 199</strong>
	</div>
</body>
</html>
